//对外暴露配置路由(常量路由)
export const constantRoute = [
    {
        //登录
        path: '/login',
        component: () => import('@/view/login/index.vue'),
        name: 'login',
        meta: {
            title: '登录',//菜单标题(meta 用于存储路由的元信息，如标题、权限等)
            hidden: true,//代表路由标题在菜单中是否隐藏  true:隐藏 false:不隐藏
            icon: "Promotion",//菜单文字左侧的图标,支持element-plus全部图标
        }
    },
    {
        path: '/',
        component: () => import('@/layout/index.vue'),
        name: 'layout',
        redirect: '/dashboard',
        meta: {
            title: '首页',
            icon: 'HomeFilled'
        },
        children: [
            {
                path: '/dashboard',
                component: () => import('@/view/dashboard/index.vue'),
                name: 'dashboard',
                meta: {
                    title: '仪表盘',
                    icon: 'DataAnalysis'
                }
            }
        ]
    },
    {
        path: '/screen',
        component: () => import('@/view/screen/index.vue'),
        name: 'Screen',
        meta: {
            hidden: false,
            title: '数据大屏',
            icon: 'Platform'
        }
    },
    {
        // 404页面
        path: '/404',
        component: () => import('@/view/404/index.vue'),
        name: '404',
        meta: {
            title: '404',
            hidden: true
        }
    },

]


export const anyRoute = [
    {
        // 任意路由重定向到404
        path: '/:pathMatch(.*)*',
        redirect: '/404',
        name: 'Any',
        meta: {
            title: '任意路由',
            hidden: true
        }
    }
]

export const asyncRoute = [
    {
        path: '/system',
        component: () => import('@/layout/index.vue'),
        name: 'system',
        meta: {
            title: '系统管理',
            icon: 'Setting'
        },
        children: [
            {
                path: '/system/user',
                component: () => import('@/view/system/user/index.vue'),
                name: 'user',
                meta: {
                    title: '用户管理',
                    icon: 'User'
                }
            },
            {
                path: '/system/role',
                component: () => import('@/view/system/role/index.vue'),
                name: 'role',
                meta: {
                    title: '角色管理',
                    icon: 'UserFilled'
                }
            },
            {
                path: '/system/menu',
                component: () => import('@/view/system/menu/index.vue'),
                name: 'menu',
                meta: {
                    title: '菜单管理',
                    icon: 'Menu'
                }
            }
        ]
    },
    {
        path: '/employee',
        component: () => import('@/layout/index.vue'),
        name: 'employee',
        meta: {
            title: '员工管理',
            icon: 'Avatar'
        },
        children: [
            {
                path: '/employee/list',
                component: () => import('@/view/employee/list/index.vue'),
                name: 'employeeList',
                meta: {
                    title: '员工列表',
                    icon: 'List'
                }
            },
            {
                path: '/employee/department',
                component: () => import('@/view/employee/department/index.vue'),
                name: 'department',
                meta: {
                    title: '部门管理',
                    icon: 'OfficeBuilding'
                }
            }
        ]
    },
]
